/*
 * @Descripttion:
 * @version: 1.0.0
 * @Author: Shentong
 * @Date: 2021-04-09 12:34:34
 * @LastEditors: Shentong
 * @LastEditTime: 2021-11-19 17:09:36
 */
/**
 * @description 此页面暂时不用： TODO:
 */
// eslint-disable-next-line @typescript-eslint/no-use-before-define
 import React, { useEffect, useState } from "react";
import Taro from '@tarojs/taro'

import { AtAvatar } from 'taro-ui'

 import { View, Swiper, SwiperItem } from "@tarojs/components";

import DefaultAvatar from '@/src/assets/my/defaultAvatar.png'

 import styles from './index.module.scss'

 const CommentItem = (props) => {

  const { userPhoto = DefaultAvatar, createTime = '', cellPhone = '', content = '', isReply = '', showIcon = false, delBtnClick = () => {}} = props

   return (
     <View className={`${styles.commentItem} ${ !showIcon && styles.paddingRight }`}>
        <View className={styles.container}>
          <View className={styles.avatar}>
            <AtAvatar circle image={userPhoto} size='small'></AtAvatar>
          </View>
          <View className={styles.content}>
            <View className={styles.phoneTime}>
              <View className={styles.phone}>{cellPhone}</View>
              <View className={styles.ctime}>{createTime}</View>
            </View>
            <View className={styles.list}>
              <View className={styles.itemLine}>{content}</View>
              {
                isReply ? <View className={styles.replayCtx}> 商家回复：{isReply}</View> : ''
              }
            </View>
          </View>
        </View>
        {
          showIcon ? (
            <View className={styles.btn} onClick={delBtnClick}>
              <View className='at-icon at-icon-trash'></View>
            </View>
          ) : null
        }
        
     </View>
   );
 }

 export default CommentItem
